package top.wangjingxin.dao;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.wangjingxin.base.Result;
import top.wangjingxin.model.article.ArticleDTO;
import top.wangjingxin.model.article.ArticleFullVO;
import top.wangjingxin.model.article.ArticleInfoVO;
import top.wangjingxin.model.article.ArticleSimpleTO;
import top.wangjingxin.model.article.ConfigVO;
import top.wangjingxin.util.Page;

import java.util.List;

@Repository
public interface ArticleDao {

    int count(@Param("type") int type,@Param("subType") int subType);

    List<ArticleInfoVO> getList(@Param("type") int type,@Param("subType") int subType, @Param("p") Page conversion);

    ArticleFullVO get(@Param("type") int type,@Param("subType") int subType);

    ArticleFullVO getById(int id);

    int visit(@Param("type") int type,@Param("subType") int subType);

    int visitId(int id);

    int add(ArticleDTO articleDTO);

    String getContent(int id);

    int delete(int id);

    int update(ArticleDTO articleDTO);

    ArticleSimpleTO getSimpleById(Integer id);

    ConfigVO config();

    int updateName(String s);

    int updateBelong(String s);
}
